package com.gitee.feizns.convert.impl;

import com.gitee.feizns.convert.Converter;
import com.gitee.feizns.convert.NumberConvertUtils;
import lombok.NonNull;

/**
 * @author feizns
 * @since 2019/5/19 0019
 */
public class NumberConverter implements Converter<Object, Number> {

    @Override
    public Number to(@NonNull Object original, Class<? extends Number> targetType) {
        return NumberConvertUtils.to(original, targetType);
    }

    @Override
    public boolean support(Class<?> targetType) {
        return NumberConvertUtils.isSupport(targetType);
    }

}
